// This is a text to Morse code converter. It converts text from the keyboard
// to Morse code and displays it on the screen.
// Copyright (C) 2008  Nicholas Hinkley <DarkLight.Programmer@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.


#include <iostream>

// Use the namespace label to keep the source a little cleaner. Just a little.
using namespace std;

#include "inputtxt.h"
#include "morse.h"


// This is the main entry point to the program.

int main() {
   // Use this as a return value if something goes wrong the program will 
   // change this and in the end return it.
   int end = 0;
   InputTxt intxt; // make a class and get ready to use it.
   
   vector<char> morsecode;
   // Display the simple copyright notice on the screen before it begins
   cout << "Text2Morse  Copyright (C) 2008 Nicholas Hinkley\n"
        << "This program comes with ABSOLUTELY NO WARRANTY;\n"
        << "This is free software, and you are welcome to redistribute it\n"
        << "under certain conditions;\n";
        
   intxt.gettxt();
   
   intxt.test();
   
   //intxt.sendtxt(morsecode);
   morsecode = intxt.sendtxt();
   Morse morseit;
   
   morseit.convertit(morsecode);
   
   
   return end;
}

// End of file [with a new line at the end to make some compilers happy]
